package com.xyw.his00.controller;
import com.xyw.his00.dto.AreaDTO;
import com.xyw.his00.service.Impl.dbImpl.AreaServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/area/")
public class AreaController {
    @Autowired
    private AreaServiceImpl areaService;
    //搜索省
    @RequestMapping("selectProvince")
    public List<AreaDTO> selectProvince(){
        return areaService.selectProvince();
    }

    //搜索市
    @RequestMapping("selectCity")
    public List<AreaDTO> selectCity() {
       return areaService.selectCity();
    }
    //搜索区县
    @RequestMapping("selectRegion")
        public List<AreaDTO> selectRegion() {
        return areaService.selectRegion();
    }
    @RequestMapping("selectCountry")
    //搜索乡镇
    public List<AreaDTO> selectCountry(){
        return areaService.selectCountry();
    }
}
